﻿@model Consumer.Models.UserProfileModel

@{
    ViewBag.Title = Model.UserName;
}

<h2>@ViewBag.Title</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Edit your profile.</h4>
        <hr />
        @Html.ValidationSummary("", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.UserId)
        @Html.HiddenFor(model => model.UserName)

        <div class="form-group">
            @Html.LabelFor(model => model.FirstName, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(model => model.FirstName, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.LastName, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(model => model.LastName, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "col-md-2 control-label" })
            <div class="col-md-10">
                @Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @Html.CheckBoxFor(model => model.IsTeacher, new { @class = "checkbox-inline" })
                @Html.LabelFor(model => model.IsTeacher, "I am a teacher")
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @Html.CheckBoxFor(model => model.IsStudent, new { @class = "checkbox-inline" })
                @Html.LabelFor(model => model.IsStudent, "I am a student")
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @Html.EditorFor(model => model.SendName, new { htmlAttributes = new { @class = "checkbox-inline" } })
                @Html.LabelFor(model => model.SendName)
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                @Html.EditorFor(model => model.SendEmail, new { htmlAttributes = new { @class = "checkbox-inline" }})
                @Html.LabelFor(model => model.SendEmail)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to Home", "Index", "Home")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
